
package com.hc.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name="role_and_nodes")
public class RoleAndNodes implements Serializable{
	@Id
	@GenericGenerator(name = "generator", strategy = "identity")
	@GeneratedValue(generator = "generator", strategy = GenerationType.IDENTITY)
	private int id;
	
	private int roleId;
	
	private int nodeId;
	@Column(name = "id", nullable = false)
	public int getId() {
	
		return id;
	}

	public void setId(int id) {
	
		this.id = id;
	}
	@Column(name = "role_id", nullable = false)
	public int getRoleId() {
	
		return roleId;
	}

	public void setRoleId(int roleId) {
	
		this.roleId = roleId;
	}
	@Column(name = "node_id", nullable = false)
	public int getNodeId() {
	
		return nodeId;
	}

	public void setNodeId(int nodeId) {
	
		this.nodeId = nodeId;
	}

	@Override
	public String toString() {
		return "RoleAndNodes [id=" + id + ", roleId=" + roleId + ", nodeId=" + nodeId + "]";
	}
	
}

